#############BPI Configurate Setting##################
#set_property BITSTREAM.CONFIG.BPI_SYNC_MODE Type1 [current_design]
#set_property BITSTREAM.CONFIG.EXTMASTERCCLK_EN div-1 [current_design]
set_property BITSTREAM.GENERAL.COMPRESS TRUE [current_design]
#set_property BITSTREAM.CONFIG.UNUSEDPIN Pulldown [current_design]
#set_property CONFIG_MODE BPI16 [current_design]
#set_property CFGBVS GND [current_design]
#set_property CONFIG_VOLTAGE 1.8 [current_design]
set_property BITSTREAM.CONFIG.CONFIGFALLBACK ENABLE [current_design]
#set_property BITSTREAM.CONFIG.NEXT_CONFIG_ADDR 0x800000 [current_design]

############## clock define##################
create_clock -period 5.000 [get_ports sys_clk_p]
set_property PACKAGE_PIN AU20 [get_ports sys_clk_p]
set_property IOSTANDARD DIFF_SSTL15 [get_ports sys_clk_p]


set_property PACKAGE_PIN AN24 [get_ports UART_DEBUG_rxd]
set_property IOSTANDARD LVCMOS18 [get_ports UART_DEBUG_rxd]
set_property PACKAGE_PIN AN23 [get_ports UART_DEBUG_txd]
set_property IOSTANDARD LVCMOS18 [get_ports UART_DEBUG_txd]
#set_property IOSTANDARD LVCMOS33 [get_ports {led[2]}]
#set_property PACKAGE_PIN AE23 [get_ports {led[2]}]



set_property IOSTANDARD LVCMOS18 [get_ports {dip_switches_4bits_tri_i[3]}]
set_property IOSTANDARD LVCMOS18 [get_ports {dip_switches_4bits_tri_i[2]}]
set_property IOSTANDARD LVCMOS18 [get_ports {dip_switches_4bits_tri_i[1]}]
set_property IOSTANDARD LVCMOS18 [get_ports {dip_switches_4bits_tri_i[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports {push_buttons_4bits_tri_i[3]}]
set_property IOSTANDARD LVCMOS18 [get_ports {push_buttons_4bits_tri_i[2]}]
set_property IOSTANDARD LVCMOS18 [get_ports {push_buttons_4bits_tri_i[1]}]
set_property IOSTANDARD LVCMOS18 [get_ports {push_buttons_4bits_tri_i[0]}]
set_property IOSTANDARD LVCMOS18 [get_ports {led_tri_o[3]}]
set_property IOSTANDARD LVCMOS18 [get_ports {led_tri_o[2]}]
set_property IOSTANDARD LVCMOS18 [get_ports {led_tri_o[1]}]
set_property IOSTANDARD LVCMOS18 [get_ports {led_tri_o[0]}]
set_property PACKAGE_PIN H20 [get_ports {dip_switches_4bits_tri_i[3]}]
set_property PACKAGE_PIN G20 [get_ports {dip_switches_4bits_tri_i[2]}]
set_property PACKAGE_PIN K22 [get_ports {dip_switches_4bits_tri_i[1]}]
set_property PACKAGE_PIN J22 [get_ports {dip_switches_4bits_tri_i[0]}]
set_property PACKAGE_PIN L19 [get_ports {push_buttons_4bits_tri_i[3]}]
set_property PACKAGE_PIN K19 [get_ports {push_buttons_4bits_tri_i[2]}]
set_property PACKAGE_PIN M20 [get_ports {push_buttons_4bits_tri_i[1]}]
set_property PACKAGE_PIN L20 [get_ports {push_buttons_4bits_tri_i[0]}]
set_property PACKAGE_PIN P19 [get_ports {led_tri_o[3]}]
set_property PACKAGE_PIN M21 [get_ports {led_tri_o[2]}]
set_property PACKAGE_PIN B21 [get_ports {led_tri_o[1]}]
set_property PACKAGE_PIN A21 [get_ports {led_tri_o[0]}]
